home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsisode80_tar.Z / vmsisode80_tar / sockit / source / dns / sethostent.c < prev   
Encoding:
C/C++ Source or Header  |  1991-03-15  |  1.5 KB  |  49 lines

  1. #include <fiddle.h>
  2. /*
  3.  * Copyright (c) 1985 Regents of the University of California.
  4.  * All rights reserved.
  5.  *
  6.  * Redistribution and use in source and binary forms are permitted
  7.  * provided that: (1) source distributions retain this entire copyright
  8.  * notice and comment, and (2) distributions including binaries display
  9.  * the following acknowledgement:  ``This product includes software
  10.  * developed by the University of California, Berkeley and its contributors''
  11.  * in the documentation or other materials provided with the distribution
  12.  * and in all advertising materials mentioning features or use of this
  13.  * software. Neither the name of the University nor the names of its
  14.  * contributors may be used to endorse or promote products derived
  15.  * from this software without specific prior written permission.
  16.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  17.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  18.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19.  */
  20.  
  21. #if defined(LIBC_SCCS) && !defined(lint)
  22. static char sccsid[] = "@(#)sethostent.c    6.6 (Berkeley) 6/1/90";
  23. #endif /* LIBC_SCCS and not lint */
  24.  
  25. #include <sys/types.h>
  26. #include <arpa/nameser.h>
  27. #include <netinet/in.h>
  28. #include <resolv.h>
  29.  
  30. sethostent(stayopen)
  31. {
  32.     if (stayopen)
  33.         _res.options |= RES_STAYOPEN | RES_USEVC;
  34. }
  35.  
  36. endhostent()
  37. {
  38.     _res.options &= ~(RES_STAYOPEN | RES_USEVC);
  39.     _res_close();
  40. }
  41.  
  42. sethostfile(name)
  43. char *name;
  44. {
  45. #ifdef lint
  46. name = name;
  47. #endif
  48. }
  49.